<% if logged_in? && @resource.user.id == current_user.id %>
<div style="float: right;">
  <%= link_to image_tag("/images/update_resource.png"), edit_resource_path(@resource) %>
</div>
<% end %>

<%= render :partial => 'resources/resource', :object => @resource %>
